package cn.wzy.pojo;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

/**
 * @author nihaowzy
 * @date 2020/12/22 16:33
 */
public class User {
    /**
     * 用户id
     */
    private Integer id;
    /**
     * 用户名
     */
    private String username;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 用户真实姓名
     */
    private String realname;
    /**
     * 角色 1 管理员 2 业务员
     */
    private Integer role;
    /**
     * 状态 1 在职 2 离职
     */
    private Integer deleted;
    /**
     * 用户头像
     */
    private String img;
    /**
     * 用户入职时间
     */
    @JSONField(format = "yyyy-MM-dd")
    private Date createTime;
    /**
     * 数据修改时间
     */
    @JSONField(format = "yyyy-MM-dd")
    private Date modifyTime;
    /**
     * 用户离职时间
     */
    @JSONField(format = "yyyy-MM-dd")
    private Date deletedTime;

    public User() {
    }

    public User(Integer id, String username, String password, String realname, Integer role, Integer deleted, String img, Date createTime, Date modifyTime, Date deletedTime) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.role = role;
        this.deleted = deleted;
        this.img = img;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.deletedTime = deletedTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getDeletedTime() {
        return deletedTime;
    }

    public void setDeletedTime(Date deletedTime) {
        this.deletedTime = deletedTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", realname='" + realname + '\'' +
                ", role=" + role +
                ", deleted=" + deleted +
                ", img='" + img + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", deletedTime=" + deletedTime +
                '}';
    }
}

